<?php

if($event->type == ircEvent::CTCP && strtolower($event->ctcp) == 'red alert') {
	lcars::mksnd(lcars::SND_INIT_REMOTE);
	lcars::$w->setAlertStatus(true);
	lcars::$w->text1->buffer->append(sprintf(
		'%s %s => %s sounded a RED ALERT',
		lcars::date(),
		$event->network->network,
		$event->nick	
	));
}

if($event->type == ircEvent::CTCP && strtolower($event->ctcp) == 'stand down red alert') {
	lcars::$w->setAlertStatus(false);
	lcars::mksnd(lcars::SND_INIT_REMOTE);
	lcars::$w->text1->buffer->append(sprintf(
		'%s %s => %s called for stand down from RED ALERT',
		lcars::date(),
		$event->network->network,
		$event->nick	
	));
}

if($event->type == ircEvent::CTCP && $event->ctcp == 'VERSION') {
	lcars::mksnd(lcars::SND_INIT_REMOTE);
	lcars::$w->text1->buffer->append(sprintf(
		'%s %s => VERSION request from %s',
		lcars::date(),
		$event->network->network,
		$event->nick	
	));
	$event->network->writeNetwork("NOTICE {$event->nick} :\001".commnet::$VERSION."\001");
}


?>